<?php

$com = "";
if (isset($_GET["com"])) {
    $com = trim($_GET["com"]);
}


switch ($com) {
    case "":
        include_once 'components/com_panel/index.php';
        break;
    case "com_configuration":
    case "com_article":
    case "com_item":
    case "com_property":
    case "com_orders":
    case "com_procedure":
    case "com_field":
    case "com_unit":
    case "com_video":
    case "com_user":
    case "com_slideshow":
    case "com_menu":
    case "com_contact":
    case "com_image":
    case "com_profile":
    case "com_login":
    case "com_logo":
        include_once "components/$com/index.php";
        break;
    default:
        
        $file_path = "components/$com/$com.html.php";

        if (file_exists($file_path)) {
            include_once( $file_path );
        } else {
            include_once("404.php");
        }
        break;
}
?>
